Skip to content

Feat: complete migration from print calls to logging module#363

Merged
C4ptainCrunch merged 9 commits into
DocHub-ULB:mainfrom
mnietona:feature/issue-267-logging
Mar 29, 2026
Merged

Feat: complete migration from print calls to logging module#363
C4ptainCrunch merged 9 commits into
DocHub-ULB:mainfrom
mnietona:feature/issue-267-logging

Conversation

@mnietona

@mnietona mnietona commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fully addresses issue #267 by replacing all standard print() calls with the Python logging module across the entire codebase.

Technical Changes

  • Core Logging Engine: Configured a robust LOGGING dictionary in www/settings.py.
  • UI Integration: Implemented rich.logging.RichHandler to ensure that logs coexist gracefully with the rich progress bars used in scraping commands.
  • Full Migration:
    • Migrated all management commands in catalog/ (load_tree, load_courses, clean_archives, find_orphans, crawl_uv, download_programs, etc.).
    • Migrated the background tasks in documents/tasks.py (crucial for Celery monitoring).
    • Cleaned up internal parsers and www/settings.py warning messages.
  • Verification: Ran a project-wide grep to ensure zero remaining print() calls.

Quality Control

  • All changes are formatted according to project standards (black, isort).
  • All GitHub Actions checks (build & pre-commit) are passing.

Fixes #267

@mnietona mnietona changed the title feat: implementation of logging system and migration of catalog commands Feat: complete migration from print calls to logging module Mar 8, 2026

@C4ptainCrunch C4ptainCrunch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR :)
Seems good to me, besides my 2 comments 👍

For the next ones, could you write a shorter more meaningful description ? Here most of the text does not bring me useful info, sometimes it's because it's evident (eg: CI is passing), sometimes because it lacks explanations (what is a "robust LOGGING dict" ?), sometimes it's redundant (you say twice that it fixes #267)

Comment thread www/settings.py
Comment thread www/settings.py
@C4ptainCrunch C4ptainCrunch merged commit ff49125 into DocHub-ULB:main Mar 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider replacing all the print calls by calls to log

2 participants